package com.myssm.mybatis.org.apache.ibatis.session;

import com.myssm.mybatis.org.apache.ibatis.configuration.Configuration;

//用于获取SqlSession
public class DefaultSqlSessionFactory implements SqlSessionFactory{
    private final Configuration configuration;
    public DefaultSqlSessionFactory(Configuration configuration){
        this.configuration=configuration;
    }

    @Override
    public SqlSession openSession() {
        return new DefaultSqlSession(configuration);
    }
}
